<!doctype html>
<html>
<head>
    <title>站点管理</title>
    <?php $this->load->module('admin/index/page_header');?>
    <link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/public/Lib/webuploader/webuploader.css">
    <!--引入JS-->
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/webuploader/webuploader.js"></script>
    <link href="<?php echo URLPRE;?>static/admin/css/font_icon.css" rel="stylesheet" />
    <style>
        .input{width:300px}
    </style>
</head>
<body>

<div class="wrap">
    <div id="home_toptip"></div>
    <div class="table_full">
        <form class="formvalidate" action="" method="post">
            <div class="h_a clearfix">站点管理 <a href="<?php echo site_url('admin/index')?>"><em class="red">当前站点ID: <?php echo $GLOBALS['sid']?> </em></a><a style="float:right" href="<?php echo site_url('admin/index/logout')?>">退出登录</a></div>
            <div class="nav">
                <ul class="cc tab" id="conf_menu">
                    <li <?php if($_GET['linshi']){echo 'class="current"';}?>><a href="<?php echo site_url('admin/site/index?linshi=1');?>">临时域名站点列表</a></li>
                    <li <?php if(!$_GET['linshi']){echo '';}?>><a href="<?php echo site_url('admin/site/index');?>">已上线站点列表</a></li>
                    <li><a href="<?php echo site_url('admin/site/add');?>">添加站点</a></li>
                    <li class="current" ><a href="<?php echo site_url('admin/site/pub');?>">上线</a></li>
                </ul>
            </div>


            <div class="table_list">
                <div class="h_a">批量上线</div>
                <form class="formvalidate" action="" method="post">
                    <table width="100%" class="tab_label" id="general_config">
                        <tr>
                            <td width="320px"><b>临时域名</b></td>
                            <td width="320px"><b>正式域名<br>http://开头，结尾不能有/</b></td>
                            <td><b>核对</b></td>
                            <td colspan="2"><b>状态</b></td>
                        </tr>
                        <tr id="first">
                            <td>
                                <input type="text" class="input" name="rows[old_url][]" value="http://" />
                            </td>
                            <td>
                                <input type="text" class="input" name="rows[new_url][]" value="http://" />
                            </td>
                            <td>
                                <div class="re"></div>                            </td>

                            <td>
                                <div class="state">无核对信息</div>
                            </td>
                            <td><a href="javascript:;" onclick="rem(this)">移除</a></td>
                        </tr>
                        <tr id="ctrl">
                            <td colspan="3">
                                <input type="hidden" name="rows[status][]" value="1" />
                                <input type="hidden" name="multi" value="1" />
                                <button type="submit" class="btn btn_submit J_ajax_submit_btn">全部上线</button>
                            </td>
                            <td>&nbsp;
                            </td>
                            <td>
                                <a class="add" onclick="return add_row(1);">增加1行</a>
                                <a class="add" onclick="return add_row(4);">增加5行</a>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>


            </form>
        </div>
    </div>

<script type="text/javascript">
    var j = 1;
    function add_row(num){
        for(var i = 0;i<num;i++){
            var h = $('#first').clone();
            h.attr('id','');
            h.insertBefore($('#ctrl'));
        }
        return false;
    }
    function syncfounder(obj){
        $(obj).parent().parent().find('.founder').val($(obj).val());
    }
    function rem(o){
        if(!$(o).parent().parent().attr('id')){
            $(o).parent().parent().remove();
        }
    }
</script>
</body>
</html>